home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
kermit.columbia.edu
/
kermit.columbia.edu.tar
/
kermit.columbia.edu
/
newsgroups
/
misc.20041116-20060924
/
000360_toastyboy@googlemail.com_Tue Jun 20 10:33:25 2006.msg
< prev
next >
Wrap
Internet Message Format
|
2006-09-27
|
2KB
Path: newsmaster.cc.columbia.edu!panix!bloom-beacon.mit.edu!4.24.21.218.MISMATCH!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!r2g2000cwb.googlegroups.com!not-for-mail
From: toastyboy@googlemail.com
Newsgroups: comp.protocols.kermit.misc
Subject: Assigning output from LINEOUT to a variable
Date: 20 Jun 2006 06:54:04 -0700
Organization: http://groups.google.com
Lines: 57
Message-ID: <1150811644.629253.47720@r2g2000cwb.googlegroups.com>
NNTP-Posting-Host: 64.69.191.231
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
X-Trace: posting.google.com 1150811649 28426 127.0.0.1 (20 Jun 2006 13:54:09 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Tue, 20 Jun 2006 13:54:09 +0000 (UTC)
User-Agent: G2/0.2
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322),gzip(gfe),gzip(gfe)
X-HTTP-Via: 1.0 TROW-ISA1
Complaints-To: groups-abuse@google.com
Injection-Info: r2g2000cwb.googlegroups.com; posting-host=64.69.191.231;
posting-account=9CvZkQ0AAABEiymyFVJPVVB65tz-PEMS
Xref: newsmaster.cc.columbia.edu comp.protocols.kermit.misc:15617
Hi,
I'm using kermit to control a quasar electronics 3108 serial module, at
present I am calling the kermit script i have written from a bash shell
script and it works ok, but it is inefficient.
I'm hoping to write the whole thing inside a kermit script, however I'm
stuck....
I can read in a file and then assign the value contained in that file
to a variable that works a treat! See below:
OPEN READ /u01/status/OUT58
READ \%a
close read-file
if ( == \%a 0 ) {
LINEOUT F1
INPUT 5 \"#\"
} else {
LINEOUT N1
INPUT 5 \"#\"
}
As I say that works well, however I need to be able to do (say)
LINEOUT I1
which will give me the status of input line 1 and then take the output
of this and if it is 1 then do something, if it is 0 then do something
else.
So I need something like:
LINEOUT I1 > \%a
INPUT 5 \"#\"
if ( == \%a 0 ) {
echo 1 > IN11
} else {
echo 0 > IN11
}
...but I've just made up the syntax of the fist line "LINEOUT I1 >
\%a" I need to know how to inject the output of this command to a
variable.
I hope that makes sense.
Thanks
-Dan